/*
 * @Descripttion:
 * @version:
 * @Author: 淏
 * @Date: 2023-11-06 22:03:04
 * @LastEditors: 淏
 * @LastEditTime: 2024-04-30 18:25:50
 */

import request from '../utils/request'

/**
 * @description 数据集字段
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//获取数据集下的字段
export function query_tableColumn(params) {
  return request({
    url: '/tableColumn/query',
    method: 'get',
    params: params,
  })
}
//用户主动上传数据集字段（一个数据集的字段只能主动上传一次。有字段的数据集不能上传，可以修改字段的顺序，不能修改、删除字段的名称和类型）
export function insert_tableColumn(data) {
  return request({
    url: '/tableColumn/insertList',
    method: 'post',
    data: data,
  })
}

/**
 * @description 数据集数据
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//模糊查询数据集数据
export function fuzzyQuery_import(data) {
  return request({
    url: '/import/fuzzyQuery',
    method: 'post',
    data: data,
  })
}
//清空数据集
export function truncateTable_import(data) {
  return request({
    url: '/import/truncateTable',
    method: 'post',
    data: data,
  })
}
//添加数据集数据、一行
export function insert_ImportData(data) {
  return request({
    url: '/import/insertImportData',
    method: 'post',
    data: data,
  })
}
//修改数据集数据、一行
export function update_ImportData(data) {
  return request({
    url: '/import/updateImportData',
    method: 'post',
    data: data,
  })
}
//删除数据集数据、一行
export function delete_ImportData(data) {
  return request({
    url: '/import/deleteImportData',
    method: 'post',
    data: data,
  })
}

/**
 * @description 数据集
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//新建数据集
export function insert_import(data) {
  return request({
    url: '/import/insert',
    method: 'post',
    data: data,
  })
}
//根据类型查出所有数据集的id和名称
export function queryByType_import(data) {
  return request({
    url: '/import/queryByType',
    method: 'post',
    data: data,
  })
}
//修改数据集名称
export function update_import(data) {
  return request({
    url: '/import/update',
    method: 'post',
    data: data,
  })
}
//删除数据集
export function delete_import(data) {
  return request({
    url: '/import/delete',
    method: 'post',
    data: data,
  })
}
//模糊查询数据集
export function queryPage_import(data) {
  return request({
    url: '/import/queryPage',
    method: 'post',
    data: data,
  })
}
//上传Excel
export function uploadExcel_import(data) {
  return request({
    url: '/import/uploadExcel',
    method: 'post',
    data: data,
  })
}
//导入邮政银行余额文件（一次可选多个文件,默认去重）
export function uploadExcel_youzhengyue(data) {
  return request({
    url: '/import/youzhengyue',
    method: 'post',
    data: data,
  })
}
//导入邮政银行流水文件（一次可选多个文件,默认去重）
export function uploadExcel_youzheng(data) {
  return request({
    url: '/import/youzheng',
    method: 'post',
    data: data,
  })
}
//导入建设银行余额文件（一次可选多个文件,默认去重）
export function uploadExcel_jiansheyue(data) {
  return request({
    url: '/import/jiansheyue',
    method: 'post',
    data: data,
  })
}
//导入建设银行流水文件（一次可选多个文件,默认去重）
export function uploadExcel_jianshe(data) {
  return request({
    url: '/import/jianshe',
    method: 'post',
    data: data,
  })
}
//导出数据
export function exportExcel_import(data) {
  return request({
    url: '/import/exportExcel',
    method: 'post',
    data: data,
    responseType: 'arraybuffer',
  })
}
//数据保存
export function dataPersist_import(data) {
  return request({
    url: '/import/dataPersist',
    method: 'post',
    data: data,
  })
}
//数据碰撞
export function collision_import(data) {
  return request({
    url: '/import/collision',
    method: 'post',
    data: data,
  })
}
//数据清洗
export function clean_import(data) {
  return request({
    url: '/import/clean',
    method: 'post',
    data: data,
  })
}
//碰撞类型
export function getAll_joinType() {
  return request({
    url: '/joinType/getAll',
    method: 'get',
  })
}
/**
 * @description 字段类型
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//获取所有字段类型
export function queryAll_columnType(params) {
  return request({
    url: '/columnType/queryAll',
    method: 'get',
    params: params,
  })
}
//新增字段类型
export function insert_columnType(data) {
  return request({
    url: '/columnType/insert',
    method: 'post',
    data: data,
  })
}
//修改字段类型
export function update_columnType(data) {
  return request({
    url: '/columnType/update',
    method: 'post',
    data: data,
  })
}
//删除字段类型
export function delete_columnType(data) {
  return request({
    url: '/columnType/delete',
    method: 'post',
    data: data,
  })
}

/**
 * @description 日期格式化规则
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//获取所有日期格式化规则
export function query_dateFormatRule(params) {
  return request({
    url: '/dateFormatRule/query',
    method: 'get',
    params: params,
  })
}
//新增日期格式化规则
export function insert_dateFormatRule(data) {
  return request({
    url: '/dateFormatRule/insert',
    method: 'post',
    data: data,
  })
}
//修改日期格式化规则
export function update_dateFormatRule(data) {
  return request({
    url: '/dateFormatRule/update',
    method: 'post',
    data: data,
  })
}
//删除日期格式化规则
export function delete_dateFormatRule(data) {
  return request({
    url: '/dateFormatRule/delete',
    method: 'post',
    data: data,
  })
}
/**
 * @description 规则模块
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//获取所有规则模块
export function query_rule(params) {
  return request({
    url: '/rule/query',
    method: 'get',
    params: params,
  })
}
//新增规则模块
export function insert_rule(data) {
  return request({
    url: '/rule/insert',
    method: 'post',
    data: data,
  })
}
//修改规则模块
export function update_rule(data) {
  return request({
    url: '/rule/update',
    method: 'post',
    data: data,
  })
}
//删除规则模块
export function delete_rule(data) {
  return request({
    url: '/rule/delete',
    method: 'post',
    data: data,
  })
}

/**
 * @description 用户管理
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//用户登陆
export function user_login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data: data,
  })
}
//分页查询用户
export function select_user(params) {
  return request({
    url: '/user/select-user',
    method: 'get',
    params: params,
  })
}
//添加用户
export function add_user(data) {
  return request({
    url: '/user/add-user',
    method: 'post',
    data: data,
  })
}
//修改用户
export function update_user(data) {
  return request({
    url: '/user/update-user',
    method: 'post',
    data: data,
  })
}
//删除用户
export function del_user(data) {
  return request({
    url: '/user/del-user',
    method: 'post',
    data: data,
  })
}

/**
 * @description 操作日志
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//分页查询日志
export function select_logs(data) {
  return request({
    url: '/logs/select-logs',
    method: 'post',
    data: data,
  })
}

/**
 * @description 部门模块
 * @author haoChen 15239820820@163.com
 * @export
 * @param {}
 * @return {}
 */
//分页查询部门
export function select_department(params) {
  return request({
    url: '/department/query',
    method: 'get',
    params: params,
  })
}
//添加部门
export function add_department(data) {
  return request({
    url: '/department/add',
    method: 'post',
    data: data,
  })
}
//修改部门
export function update_department(data) {
  return request({
    url: '/department/update',
    method: 'post',
    data: data,
  })
}
//删除部门
export function del_department(data) {
  return request({
    url: '/department/del',
    method: 'post',
    data: data,
  })
}
//查询部门下拉列表
export function queryAll_department() {
  return request({
    url: '/department/queryAll',
    method: 'get',
  })
}
